<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%String contextPath = request.getContextPath();%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%response.setContentType("text/html;charset="+org.apache.struts2.config.DefaultSettings.get("struts.i18n.encoding"));%>
<%
	String path = request.getContextPath();
	String ServletPath = request.getServletPath();
	String PathInfo = request.getPathInfo();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
<head>
<title>商会管理平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.js"></script>

<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/md5.js"></script>
	
<script type="text/javascript">
function updateStaff(){
	if(document.getElementById("title").value==""){
		alert("账号名称不能为空.");
		return false;
	}
	
	document.forms[0].action = "<%=contextPath%>/adminlogin/updateStaffAuth.action"; 
	document.forms[0].submit();
}
	
</script>
</head>
<body background="${pageContext.request.contextPath}/images/bg.png">
<form method="post" name="from1" id="from1">

<input type="hidden" id="id" name="id" value="${staffInfo.id}">
<font style="color: #000000; font-weight: bold;">账号名称：</font> <input id="title" name="title" value="${staffInfo.title}" maxlength="16" type="text" style="width:200px; height:20px; padding-left:6px; font-size:12px;"/>

<div style="color: #000000; font-weight: bold;">权限分配</div>
<s:iterator id="auth" value="#request.listAuth" status="status">
	<s:if test="${auth.isChecked==true}">
		<input type="checkbox" checked="checked" name="auth" value ="${auth.id}" >${auth.title}<br>
	</s:if>
	<s:else>
		<input type="checkbox" name="auth" value ="${auth.id}" >${auth.title}<br>
	</s:else>
</s:iterator>

<button onclick="updateStaff()">  提交注册信息     </button>
</form>

</body>
</html>

